package cn.apelx.shardingjdbc.domain;

import lombok.Getter;
import lombok.ToString;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 订单
 *
 * @author apelx
 * @since 2022-05-13
 */
@ToString
@Getter
@Entity
@Table(name = "t_order")
public class Order implements Serializable {

    @Id
    private Integer id;

    private Integer orderType;

    private Integer customerId;

    private BigDecimal amount;

    protected Order() {
    }

    public Order(Integer id, Integer orderType, Integer customerId, BigDecimal amount) {
        this.id = id;
        this.orderType = orderType;
        this.customerId = customerId;
        this.amount = amount;
    }
}
